package org.idea.qiyu.framework.mybatis.controller;

import org.idea.qiyu.framework.mybatis.config.MybatisBeanWrapper;
import org.idea.qiyu.framework.mybatis.mapper.UserMapper;
import org.idea.qiyu.framework.mybatis.mapper.po.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author linhao
 * @Date created in 8:20 上午 2021/10/8
 */
@RestController
@RequestMapping(value = "/test")
public class TestController {

    @Resource
    private MybatisBeanWrapper<UserMapper> userMapper;

    @GetMapping(value = "/do-test")
    public String doTest(){
        UserMapper userMapperDao = userMapper.getObject();
        List<User> userList = userMapper.getObject().selectAll();
        System.out.println(userList);
        return "success";
    }
}
